#include "simplebanner.h"
#include "adviewcontrol.h"
#include <QPushButton>

simpleBanner::simpleBanner()
{
    pBanner = new AdViewControl(this);
    QPushButton* button = new QPushButton(this);
    button->setText("close");
    button->setGeometry(QRect(0,250,100,50));
    connect(button,SIGNAL(clicked()),this,SLOT(onclick()));

    if (pBanner){
            pBanner->setGeometry(QRect(0,0,340,200));
            pBanner->set_Zone("20249");

            pBanner->set_Site("8061");

            pBanner->set_HorizontalAlignment(AdViewControl::HORZ_CENTER);
            pBanner->set_VerticalAlignment(AdViewControl::VERT_CENTER);
            pBanner->set_Premium(AdViewControl::PREMIUM_STATUS_NON_PREMIUM);

            pBanner->Update();

    }
}

void simpleBanner::onclick()
{
    this->done(QDialog::Rejected);
}
